#!/usr/bin/env bash

# Test given path

if [[ ! -d $1 ]]
then
    echo 'Usage: svn_dir_props path'
    exit 1
else
    echo
    echo 'Working, please wait.'
    echo
fi

# Config

path=$1
mask='.svn,Zend'

# Split mask

mask=`echo $mask | awk 'gsub(/,/, "|", $0) {print $0}'`

# Get directories

dirs=`find $path -type d | awk -v mask=$mask '$0 !~ mask {print $0}'`

# Get properties

for dir in $dirs
do
    svn proplist --verbose $dir
done

echo 'Done.'
exit 0
